package com.yjj.springboot3.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * JWT配置类
 *
 * @author yjj
 */
@Data
@Component
@ConfigurationProperties(prefix = "jwt")
public class JwtConfig {

    /**
     * 令牌自定义标识
     */
    private String header = "Authorization";

    /**
     * 令牌密钥
     */
    private String secret = "abcdefghijklmnopqrstuvwxyz";

    /**
     * 令牌有效期（默认30分钟）
     */
    private int expireTime = 30;

    /**
     * 令牌前缀
     */
    private String tokenPrefix = "Bearer ";

    /**
     * 登录用户key
     */
    private String loginUserKey = "login_user_key";
}
